package com.imooc.mail.enums;

import lombok.Getter;

/**
 * @Author wjc
 * Date on 2020/6/4 22:48
 */
@Getter
public enum ResponseEnum {
    ERROR(-1, "服务端错误"),
    SUCCESS(0, "成功"),
    PASSWORD_ERROR(1, "密码错误"),
    USERNAME_EXIST(2, "用户名已存在"),
    USEREMAIL_EXIST(3, "用户邮箱已存在"),
    PARAM_ERROR(4, "参数错误"),
    USER_ACCOUNT_OR_PWD_ERROR(5,"用户账号或者密码错误"),
    NEED_LOGIN(10, "用户未登录，请先登录"),
    PRODUCT_OFF_SALE_OR_DELETE(11,"商品已下架或删除"),
    PRODUCT_NOT_EXIST(12,"商品不存在"),
    PRODUCT_STOCK_SHORTAGE_ERROR(13,"商品库存不足"),
    CART_PRODUCT_NOT_EXIST(14,"购物车里商品不存在"),
    DELETE_SHIPPING_FAIL(15, "删除收货记录失败")
    ;

    Integer code;
    String desc;

    ResponseEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}
